package cn.t.enums.order;

import cn.t.core.exception.BaseError;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ErrorEnum implements BaseError {

    ABNORMAL_DATA(500002, "异常数据%s"),
    DATA_ALREADY_EXISTS(500003, "%s数据已存在"),
    OPERATE_FAIL(500004, "操作失败"),
    NO_DATA(500005, "无数据"),
    DATA_TO_MANY(500006, "数据太多%s"),
    FILE_FORMAT_ERROR(500007, "文件格式错误"),
    FILE_PARSE_ERROR(500008, "文件解析失败"),

    SKU_NOT_FOUND(500009, "商品信息不存在 %s"),
    CARGOWAY_CODE_RE(500010, "货道号有重复"),
    CARGOWAY_CODE_NOT_FOUND(500011, "货道信息异常 ，货道信息为 %s"),
    OFF_NOT_FOUND(500012, "该下架商品未上架，请上架后再操作 ，货道号为 %s"),
    DEVICE_NOT_FOUND(500013, "设备信息不存在 %s"),
    DATA_NOT_FOUND(500014, "数据导入为空"),
    DATA_PUSH_ERROR(500015, "数据推送失败,原因是%s"),
    BUSINESS_ERROR(500016, "业务异常"),
    INVENTORY_ERROR( 500017, "库存必须为正整数!"),
    INVENTORY_NOT_ENOUGH(500018, "库存不足!"),
     ORDER_SN_MISSING(500019, "订单号缺失,无法下单!"),
    ;
    @JsonValue
    @EnumValue
    private final Integer code;
    private final String message;

}
